package com.yotta.operationdatascreencode.common.core;

import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 分页请求参数公共类
 */
@Schema(description = "分页请求参数")
public class BasePageParam {

    @Schema(description = "第几页", required = true)
    @NotNull(message = "必传参数不能为空")
    @Min(value = 1, message = "页码最小值为1")
    private Long pageNum;

    @Schema(description = "每页条数", required = true)
    @NotNull(message = "必传参数不能为空")
    @Max(value = 100, message = "最大值值为100")
    private Long pageSize;

    public Long getPageNum() {
        return pageNum;
    }

    public Long getPageSize() {
        return pageSize;
    }

    public void setPageNum(Long pageNum) {
        this.pageNum = pageNum;
    }

    public void setPageSize(Long pageSize) {
        this.pageSize = pageSize;
    }
}
